﻿using System;
using System.Windows;
using System.Windows.Media;
using System.Runtime.InteropServices;
using System.Windows.Interop;
using System.Text;

namespace MineLaunch.Common
{
	public class Win32API
	{
		[StructLayout(LayoutKind.Sequential)]
		public struct POINT { public UInt32 X; public UInt32 Y; }
		[StructLayout(LayoutKind.Sequential)]
		public struct RECT { public int left; public int top; public int right; public int bottom; }

		[DllImport("User32.dll")]
		public static extern void GetCursorPos(out POINT pt);
		[DllImport("User32.dll")]
		public static extern int ScreenToClient(IntPtr hwnd, ref POINT pt);

		[DllImport("User32.dll")]
		public static extern int MoveWindow(IntPtr hwnd, int x, int y, int nWidth, int nHeight, int bRepaint);
		[DllImport("User32.dll")]
		public static extern int GetWindowRect(IntPtr hwnd, ref RECT lpRect);
		[DllImport("User32.dll")]
		public static extern int GetClientRect(IntPtr hwnd, ref RECT lpRect);
	}
}
